/*
 * $Id: stdarg.h 50 2009-02-10 05:48:05Z hyunghwan.chung $
 *
   Copyright 2005-2009 Chung, Hyung-Hwan.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an  BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */

#ifndef _XP_BAS_STDARG_H_
#define _XP_BAS_STDARG_H_

#include <xp/types.h>
#include <xp/macros.h>
#include <xp/bas/memory.h>
#include <stdarg.h>

#define xp_va_start(pvar,param) va_start(pvar,param)
#define xp_va_list va_list
#define xp_va_end(pvar)      va_end(pvar)
#define xp_va_arg(pvar,type) va_arg(pvar,type)

#if defined(HAVE_VA_COPY)
#	define xp_va_copy(dst,src) va_copy(dst,src)
#else
#	if defined(HAVE___VA_COPY)
#		define xp_va_copy(dst,src) __va_copy((dst),(src))
#	else
#		define xp_va_copy(dst,src) XP_MEMCPY(&(dst),&(src),XP_SIZEOF(va_list))
#	endif
#endif


#endif
